#ifndef WSYLINE_H
#define WSYLINE_H
#include "QtGui/QOpenGLFunctions"
#include "geometry/math3d.h"

/** 王诗阳线对象 */
class WSYLine : public QObject {
    Q_OBJECT
public:
    WSYLine(GLfloat *vertex, GLfloat *direction) {
        this->vertex = Math3D::newInstanceWithOldVector(vertex);
        this->direction = Math3D::newInstanceWithOldVector(direction);
    }
    ~WSYLine() {}
    /** 设置新的节点 */
    virtual void setVertex(float x, float y, float z) {
        Math3D::setNewValue(x, y, z, vertex);
    }
    /** 设置新的方向 */
    virtual void setDirection(float dx, float dy, float dz) {
        Math3D::setNewValue(dx, dy, dz, direction);
    }
    virtual GLfloat *getVertex() {
        return vertex;
    }
    virtual GLfloat *getDirection() {
        return direction;
    }
private:
    GLfloat *vertex, *direction;
};

#endif // WSYLINE_H
